# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
  def nav_link(text, controller, action = "index")  
    #实现页面间跳转
    link_to_unless_current text, :controller => controller, :action => action
  end

  def logged_in?
    session[:user_id]
  end
end
